<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>建设单位黑名单</title>
    <script src="../../js/header.js"></script>
    <style type="text/css">
        html, body, #companycredit {
            padding: 0px;
            margin: 0px;
            /*height: 100%;*/
        }
        #companycredit{
            border-top: 3px solid #0D9AFF;
            /*background: #FFFFFF;
            box-shadow: 0px 2px 4px 0 rgba(200,200,200,0.50);*/
            padding: 25px;
            /*background: url(../../images/bg.png) no-repeat;
            background-size: 100% 100%;*/
            /*background-attachment: fixed;*/
            /*overflow: hidden;*/
        }
        .tab-title{
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left:10px;
            margin-bottom: 20px;
        }
        .el-dialog__footer {
            padding: 10px 20px 20px;
            text-align: center;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }
        .el-dialog__body {
            color: rgb(96, 98, 102);
            font-size: 14px;
            word-break: break-all;
            padding: 0px 20px;
        }
        #excel {
            display: none;
        }
        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
            transition: border-color .2s cubic-bezier(.645,.045,.355,1);
        }
        #companycredit .el-select,
        #companycredit .el-input-number{
            width: 100%;
        }
        .listed .el-form-item__label{
            letter-spacing: 3px;
        }
        .el-textarea {
            width: 95%;
        }

        /* 搜索按钮样式修改 */
        #companycredit .el-button.is-circle.search_btn{
            position: absolute;
            right: 0;
            top: 0;
            border: 0;
            background: none;
        }
        #companycredit .el-button.is-circle.search_btn i{
            font-size: 17px;
        }

        .companycredit_gonggao .el-form-item__content{
            margin-left: 0!important;
        }
        #companycredit .companycredit_publicstate .el-select{
            width: auto;
        }

        /* 拟制公告---封装样式 */
        .content_tab{
            padding: 20px 0;
        }
        .border_btm{
            border-bottom: 1px solid #ddd;
        }
        .border_left{
            border-left: 1px solid #ddd;
        }
    </style>
</head>

<body>
<div v-cloak id="companycredit">
    <div style="margin-top: 10px;">
        <div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
            <el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
                <el-row>
                    <el-col :span="8">
                        <el-form-item label="建设单位评分编号:" prop="" label-width="160px">
                            <el-input v-model="selectForm.enterpriseScoreNumber" placeholder="" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="8">
                        <el-form-item label="建设单位名称:" prop="" label-width="120px">
                            <el-input v-model="selectForm.enterpriseName" placeholder="" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="8">
                        <el-form-item label="建设单位证件号码:">
                            <el-row>
                                <el-form-item prop="">
                                    <el-input v-model="selectForm.enterpriseIdNumber" placeholder="" ></el-input>
                                </el-form-item>
                            </el-row>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <!--<el-col :span="6">
                        <el-form-item label="建设单位证件类型:" prop="" label-width="160px">
                            <el-input v-model="selectForm.enterpriseIdType" placeholder="" ></el-input>
                        </el-form-item>
                    </el-col>-->
                    <el-col :span="8">
                        <el-form-item label="建设单位分数:" prop="" label-width="160px">
                            <el-form-item prop="">
                                <el-tooltip class="item" effect="dark" content="建设单位分数介于1000~2000之间" placement="top-start">
                                    <el-input v-model="selectForm.enterpriseScore" type="number" @blur="checkPriseScore()" :min="0" @keydown.native="channelInput"></el-input>
                                </el-tooltip>
                            </el-form-item>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="建设单位分类:" prop="" label-width="120px">
                            <el-form-item prop="">
                                <el-tooltip class="item" effect="dark" content="C表示大盘，A/B优于大盘，D/E差于大盘。" placement="top-start">
                                    <el-select v-model="selectForm.enterpriseClassification" placeholder="请选择企业类型">
                                        <el-option label="A" value="1"></el-option>
                                        <el-option label="B" value="2"></el-option>
                                        <el-option label="C" value="3"></el-option>
                                        <el-option label="D" value="4"></el-option>
                                        <el-option label="E" value="5"></el-option>
                                    </el-select>
                                </el-tooltip>
                            </el-form-item>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="margin-bottom: 30px;">
                    <div style="float: right;">
                        <el-button v-if="hasApprovalBtn" type="primary" size="small" style="width: 60px;height: 30px;" @click="apply">申请</el-button>
                        <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
                        <el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
                        <el-button v-if="hasApprovalBtn" type="primary" size="small" style="width: 60px;height: 30px;" @click="appovalEx()">导出</el-button>
                    </div>
                </el-row>
            </el-form>
        </div>

        <el-table :data="tableData" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
            <!--<el-table-column type="selection" ></el-table-column>-->
            <el-table-column
                    prop="enterpriseScoreNumber"
                    label="建设单位评分编号"
                    width="250"
                    align="center" >
            </el-table-column>
            <el-table-column
                    prop="enterpriseName"
                    label="建设单位名称"
                    width="300"
                    align="center">
            </el-table-column>
            <el-table-column
                    prop="enterpriseIdNumber"
                    label="建设单位证件号码"
                    width="200"
                    align="center">
            </el-table-column>
           <!-- <el-table-column
                    prop="enterpriseIdType"
                    label="建设单位证件类型"
                    width="140"
                    align="center">
            </el-table-column>-->
            <el-table-column
                    prop="enterpriseScore"
                    label="建设单位分数"
                    width="120"
                    align="center">
            </el-table-column>
            <el-table-column
                    prop="enterpriseClassification"
                    label="建设单位分类"
                    width="120"
                    align="center">
                <template scope="scope">
                    <span v-if="scope.row.enterpriseClassification==1">A</span>
                    <span v-if="scope.row.enterpriseClassification==2">B</span>
                    <span v-if="scope.row.enterpriseClassification==3">C</span>
                    <span v-if="scope.row.enterpriseClassification==4">D</span>
                    <span v-if="scope.row.enterpriseClassification==5">E</span>
                </template>
            </el-table-column>
            <el-table-column
                    label="操作"
                    width=""
                    align="center">
                <template slot-scope="scope">
                    <el-button type="" size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
                    <span v-if="scope.row.organName == orgName">
                    <el-button v-if="hasApprovalBtn" type="danger" size="mini" @click="removeBlacklist(scope.$index,scope.row)">移出黑名单</el-button>
                    <el-button v-if="scope.row.enterpriseNotice == 0 && hasApprovalBtn" type="info" size="mini" @click="gongGao(scope.$index,scope.row)">拟制公告</el-button>
                    <el-button v-if="scope.row.enterpriseNotice != 0 && hasApprovalBtn" type="" size="mini" @click="gongGaoView(scope.$index,scope.row)">查看公告</el-button>
                    </span>
                </template>
            </el-table-column>
        </el-table>
        <div style="overflow: hidden;">
            <div class="pagination">
                <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="currentPage"
                        :page-sizes="[10, 20, 30, 40]"
                        :page-size="pagesize"
                        background
                        layout="total, sizes,prev, pager, next"
                        :total="tableTotal"
                        prev-text="上一页"
                        next-text="下一页">
                </el-pagination>
            </div>
        </div>

        <el-dialog title="" :visible.sync="dialogForm" center fullscreen>
            <div style="margin-top: 10px;">
                <el-form :model="companycredit" :rules="rules" ref="companycredit" label-width="140px">
                    <!--企业信用信息表-->
                    <el-row>
                        <el-col :span="4" class="tab-title">
                            建设单位信用黑名单
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="6">
                            <el-form-item label="建设单位评分编号:" prop="enterpriseScoreNumber">
                                <el-tooltip class="item" effect="dark" content="建设单位评分编号字段唯一，不可重复！" placement="top-start">
                                    <el-input v-model="companycredit.enterpriseScoreNumber" placeholder="" disabled></el-input>
                                </el-tooltip>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="建设单位名称:" prop="enterpriseName" style="position: relative;">
                                <el-input v-model="companycredit.enterpriseName" placeholder="" maxlength="20" :disabled="formDisabled"></el-input>
                                <el-button icon="el-icon-search" circle class="search_btn" :disabled="formDisabled" @click="onSearch();dialogFormVisible = true"></el-button>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                       <!-- <el-col span="6">
                            <el-form-item label="建设单位证件类型:" prop="enterpriseIdType">
                                <el-input v-model="companycredit.enterpriseIdType" placeholder="" maxlength="20" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>-->
                        <el-col span="12">
                            <el-form-item label="建设单位证件号码:" prop="enterpriseIdNumber">
                                <el-input v-model="companycredit.enterpriseIdNumber" placeholder="" maxlength="18" show-word-limit :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="6">
                            <el-form-item label="建设单位分数:" prop="enterpriseScore">
                                <el-tooltip class="item" effect="dark" content="建设单位分数介于1000~2000之间" placement="top-start">
                                    <el-input v-model="companycredit.enterpriseScore" type="number" @blur="checkPriseScore1()" :min="0" @keydown.native="channelInput" :disabled="formDisabled"></el-input>
                                </el-tooltip>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="建设单位分类:" prop="enterpriseClassification">
                                <el-tooltip class="item" effect="dark" content="C表示大盘，A/B优于大盘，D/E差于大盘。" placement="top-start">
                                    <el-select v-model="companycredit.enterpriseClassification" placeholder="请选择企业类型" :disabled="formDisabled">
                                        <el-option label="A" value="1"></el-option>
                                        <el-option label="B" value="2"></el-option>
                                        <el-option label="C" value="3"></el-option>
                                        <el-option label="D" value="4"></el-option>
                                        <el-option label="E" value="5"></el-option>
                                    </el-select>
                                </el-tooltip>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="6">
                            <el-form-item label="评估日期:" prop="assessmentDate">
                                <el-date-picker
                                        v-model="companycredit.assessmentDate"
                                        type="date"
                                        value-format="yyyy-MM-dd"
                                        :disabled="formDisabled"
                                        placeholder="选择评估日期">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="作出评估决定机关:" prop="assessmentAuthority">
                                <el-input v-model="companycredit.assessmentAuthority" placeholder="" maxlength="20" :disabled="formDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row v-if="showMoveInList">
                        <el-col :span="6">
                            <el-form-item label="列入黑名单日期:" prop="abnormalPutdate">
                                <!--v-model="companycredit.abnormalPutdate"
                                :disabled="moveInDisabled"
                                type="date"-->
                                <el-date-picker
                                        v-model="value1"
                                        disabled
                                        type="date"
                                        class="input-class"
                                        placeholder="选择列入黑名单日期">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="列入黑名单原因:" prop="specause">
                                <el-input v-model="companycredit.specause" placeholder="" maxlength="100" show-word-limit :disabled="moveInDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="作出决定机关（列入）:" prop="decorg" label-width="170px">
                                <el-input v-model="companycredit.decorg" placeholder="" maxlength="20" :disabled="moveInDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row v-if="showMoveOutList">
                        <el-col :span="6">
                            <el-form-item label="移出黑名单日期:" prop="remdate">
                                <!--v-model="companycredit.remdate"-->
                                <el-date-picker
                                        v-model="value1"
                                        disabled
                                        type="date"
                                        class = "input-class"
                                        placeholder="选择移出黑名单日期">
                                </el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="移出黑名单原因:" prop="remexcpres">
                                <el-input v-model="companycredit.remexcpres" placeholder="" maxlength="100" show-word-limit :disabled="moveOutDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="作出决定机关（移出）:" prop="redecorg" label-width="170px">
                                <el-input v-model="companycredit.redecorg" placeholder="" maxlength="20" :disabled="moveOutDisabled"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col>
                            <el-form-item label="加减信用分/信用评级处理结果:" prop="creditRes">
                                <el-input
                                        type="textarea"
                                        :autosize="{ minRows: 3, maxRows: 3}"
                                        :disabled="formDisabled"
                                        placeholder="请输入建设单位加减信用分/信用评级处理结果"
                                        maxlength="300"
                                        show-word-limit
                                        v-model="companycredit.creditRes">
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col>
                            <el-form-item label="加减信用分/信用评级原因:" prop="scoreCause">
                                <el-input
                                        type="textarea"
                                        :autosize="{ minRows: 5, maxRows: 5}"
                                        :disabled="formDisabled"
                                        placeholder="请输入建设单位加减信用分/信用评级原因"
                                        maxlength="300"
                                        show-word-limit
                                        v-model="companycredit.scoreCause">
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="22">
                            <div style="float:right;">
                                <el-button v-show="showOnSubmit" type="primary" size="small" style="width: 60px;height: 30px;" @click="onSubmit('companycredit')">提交</el-button>
                                <el-button v-show="showOnRemoveList" type="primary" size="small" style="width: 140px;height: 30px;" @click="onRemoveBlackList();">移出黑名单</el-button>
                                <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogForm = false;clearForm('companycredit')">取消</el-button>
                            </div>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
        </el-dialog>

        <el-dialog title="企业信息搜索" :before-close="handleDialogClose" :visible.sync="dialogFormVisible" width="70%">
            <el-form :inline="true" :model="formInline" class="demo-form-inline">
                <el-form-item label="建设单位名称">
                    <el-input v-model="formInline.enterpriseName" placeholder="请输入建设单位名称"></el-input>
                </el-form-item>
                <el-form-item label="建设单位证件号码：">
                    <el-input v-model="formInline.enterpriseIdNumber" placeholder="请输入证件号码"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="onSearch()">查询</el-button>
                </el-form-item>
            </el-form>
            <el-table
                    :data="companyInformation"
                    highlight-current-row
                    @current-change="selectCurrentChange"
                    style="width: 100%">
                <el-table-column
                        fixed
                        prop="enterpriseName"
                        label="建设单位名称">
                </el-table-column>
                <el-table-column
                        prop="enterpriseIdNumber"
                        label="建设单位证件号码">
                </el-table-column>
                <!--<el-table-column
                        prop="enterpriseIdType"
                        label="建设单位类型">
                </el-table-column>-->
                <el-table-column
                        prop="legalMan"
                        label="法人">
                </el-table-column>
            </el-table>
            <div style="overflow: hidden;">
                <div class="pagination">
                    <el-pagination
                            @size-change="handleSizeChange1"
                            @current-change="handleCurrentChange1"
                            :current-page="currentPage1"
                            :page-sizes="[5, 10, 20, 40]"
                            :page-size="pagesize1"
                            background
                            layout="total, sizes,prev, pager, next"
                            :total="tableTotal1"
                            prev-text="上一页"
                            next-text="下一页">
                    </el-pagination>
                </div>
            </div>
            <div slot="footer" class="dialog-footer" align="right">
                <el-button @click="dialogFormVisible = false;formInline.enterpriseName='';formInline.enterpriseIdNumber='';">取 消</el-button>
                <el-button type="primary" @click="onAddInformation()">确 定</el-button>
            </div>
        </el-dialog>

        <!-- 拟制公告 -->
        <el-dialog title="" :visible.sync="dialogGongGaoForm" center fullscreen>
            <div style="margin-top: 10px;">
                <el-form :model="gonggao" :rules="rules" ref="gonggao" label-width="140px">
                    <!--企业信用信息拟制公告表-->
                    <el-row>
                        <el-col :span="4" class="tab-title">
                            建设单位信用信息拟制公告表
                        </el-col>
                    </el-row>
                    <el-row class="companycredit_gonggao">
                        <el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
                            <span style="color: red;">*</span>
                            <span class="">标题:</span>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item prop="title">
                                <el-input v-model="gonggao.title" style="" placeholder="" maxlength="300" show-word-limit></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="companycredit_publicstate">
                        <el-col :span="6">
                            <el-form-item label="公布类别:" prop="isPublic" label-width="120px">
                                <el-radio-group disabled v-model="gonggao.isPublic">
                                    <el-radio label="0">公示通报</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="companycredit_publicstate">
                        <el-col :span="6">
                            <el-form-item label="公开状态:" prop="publicState" label-width="120px">
                                <!--<el-select v-model="gonggao.publicState" placeholder="请选择公开状态">
                                    <el-option label="未公开" value="0"></el-option>
                                    <el-option label="公开" value="1"></el-option>
                                </el-select>-->
                                <el-radio-group v-model="gonggao.publicState">
                                    <el-radio :label="0">未公开</el-radio>
                                    <el-radio :label="1">公开</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="companycredit_publicstate">
                        <el-col :span="14">
                            <el-form-item label="公开地址类型:" prop="publicType" label-width="120px">
                                <!--<el-select v-model="gonggao.publicType" placeholder="请选择公开状态">
                                    <el-option label="服务门户" value="0"></el-option>
                                    <el-option label="工作门户" value="1"></el-option>
                                </el-select>-->
                                <el-radio-group v-model="gonggao.publicType">
                                    <el-radio :label="0">服务门户</el-radio>
                                    <el-radio :label="1">工作门户</el-radio>
                                    <el-radio :label="2">服务门户和工作门户</el-radio>

                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row style="margin: 0 0 20px;">
                        <el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
                            <span>内容:</span>
                        </el-col>
                        <el-col :span="12">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入内容"
                                    maxlength="300"
                                    show-word-limit
                                    v-model="gonggao.attachContent">
                            </el-input>
                        </el-col>
                    </el-row>
                    <el-row style="margin: 0 0 20px;">
                        <el-col :span="2" class="tab" style="padding-right: 15px;width: 120px;text-align: right;height: 30px;line-height: 30px;">
                            <span>附加内容:</span>
                            <br/>
                            <span style="color: red;">(不可修改)</span>
                        </el-col>
                        <!--<el-col :span="12" style="border: 1px solid #ddd;">
                            <el-input type="textarea" :row="8" v-model="gonggao.content"></el-input>
                        </el-col>-->
                        <el-col :span="12" style="border: 1px solid #ddd;">
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位评分编号</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.enterpriseScoreNumber }}</span>
                                </el-col>
                            </el-row>
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位名称</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.enterpriseName }}</span>
                                </el-col>
                            </el-row>
                            <!--<el-row class="border_btm">
                                <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位证件类型</span>
                                </el-col>
                                <el-col :span="18" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.enterpriseIdType }}</span>
                                </el-col>
                            </el-row>-->
                            <!--<el-row class="border_btm">
                                <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位证件号码</span>
                                </el-col>
                                <el-col :span="18" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.enterpriseIdNumber }}</span>
                                </el-col>
                            </el-row>-->
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位分数</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.enterpriseScore }}</span>
                                </el-col>
                            </el-row>
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>建设单位分类</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span v-if="companycredit.enterpriseClassification == 1" style="padding-left: 15px;">A</span>
                                    <span v-else-if="companycredit.enterpriseClassification == 2" style="padding-left: 15px;">B</span>
                                    <span v-else-if="companycredit.enterpriseClassification == 3" style="padding-left: 15px;">C</span>
                                    <span v-else-if="companycredit.enterpriseClassification == 4" style="padding-left: 15px;">D</span>
                                    <span v-else-if="companycredit.enterpriseClassification == 5" style="padding-left: 15px;">E</span>
                                </el-col>
                            </el-row>
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>评估日期</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.assessmentDate }}</span>
                                </el-col>
                            </el-row>
                            <el-row class="border_btm">
                                <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                    <span>作出评估决定机关</span>
                                </el-col>
                                <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                    <span style="padding-left: 15px;">{{ companycredit.assessmentAuthority }}</span>
                                </el-col>
                            </el-row>
                            <el-row v-if="(companycredit.specause != '') ? true : false">
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>列入黑名单日期</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.abnormalPutdate }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>列入黑名单原因</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.specause }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>作出决定机关（列入）</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.decorg }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                            </el-row>
                            <el-row v-if="(companycredit.remexcpres != '') ? true : false">
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>移出黑名单日期</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.remdate }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>移出黑名单原因</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.remexcpres }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>作出决定机关（移出）</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 22px 0px;">
                                            <span style="padding-left: 15px;">{{ companycredit.redecorg }}</span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>加减信用分/信用评级处理结果</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 32px 0px 32px 18px;">
                                            <!--<span style="padding-left: 15px;">{{ companycredit.creditRes }}</span>-->
                                            <span v-html="companycredit.creditRes"></span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                                <el-col>
                                    <el-row class="border_btm">
                                        <el-col :span="4" style="padding: 22px 0px;text-align: center;">
                                            <span>加减信用分/信用评级原因</span>
                                        </el-col>
                                        <el-col :span="18" class="border_left" style="padding: 32px 0px 32px 18px;">
                                            <!--<span style="padding-left: 15px;">{{ companycredit.scoreCause }}</span>-->
                                            <span v-html="companycredit.scoreCause"></span>
                                        </el-col>
                                    </el-row>
                                </el-col>
                            </el-row>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="22">
                            <el-form-item label="附件:" prop="enclosure">
                                <iframe id="viewFrame" style="overflow:hidden;height:200px;width:100%;" width="100%" frameBorder="0"
                                        :src="link"></iframe>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="22">
                            <div style="float:right;">
                                <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="release()">发布</el-button>
                                <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogGongGaoForm = false;clearForm()">取消</el-button>
                            </div>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
        </el-dialog>
        <!-- 查看公告 -->
        <el-dialog title="" :visible.sync="dialogGongGaoViewForm" center fullscreen>
            <el-row>
                <el-col :span="16" :offset="4">
                    <div style="margin-top: 10px;">
                        <el-form :model="gonggao" :rules="rules" ref="gonggao">
                            <!--公开公告信息表-->
                            <el-row style="margin-bottom: 10px;">
                                <el-col>
                                    <h4 style="margin-top:10px;font-size: 40px;text-align: center;">{{ gonggao.title }}</h4>
                                </el-col>
                            </el-row>
                            <el-row style="margin-bottom: 10px;padding-bottom: 10px;font-size: 24px;border-bottom: 1px solid #ddd;text-align: center;">
                                <el-col :span="5">
                                    <span>{{ gonggao.createUser }}</span>
                                </el-col>
                                <el-col span="4">
                                    <span>{{ gonggao.inputenTime }}</span>
                                </el-col>
                                <el-col :span="6">
                                    <div style="float:right;">
                                        <span v-if="(gonggao.publicType == 0) ? true : false">服务门户</span>
                                        <span v-if="(gonggao.publicType == 1) ? true : false">工作门户</span>
                                        <span v-if="(gonggao.publicType == 2) ? true : false">服务门户和工作门户</span>
                                    </div>
                                </el-col>
                                <el-col :span="4">
                                    <div style="float:right;">
                                        <span v-if="(gonggao.publicState == 0) ? true : false">未公开</span>
                                        <span v-if="(gonggao.publicState != 0) ? true : false">公开</span>
                                    </div>
                                </el-col>
                                <el-col :span="5">
                                    <div style="float:right;">
                                        <span v-if="(gonggao.isPublic == 0) ? true : false">公示通报</span>
                                        <span v-if="(gonggao.isPublic == 1) ? true : false">标准规范</span>
                                    </div>
                                </el-col>
                            </el-row>
                            <el-row style="margin: 40px 0px;font-size: 24px;">
                                <el-col :span="20" :offset="2">
                                    <span v-html="gonggao.attachContent"></span>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="24">
                                    <el-form-item label="" >
                                        <iframe width="100%" scrolling="no" style="border: none;"   :src="link"></iframe>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <!--<el-row>
                                <el-col>
                                    <div style="float:right;">
                                        <el-button type="info" size="small" style="width: 60px;height: 30px;" @click="dialogViewForm = false;clearForm();">取消</el-button>
                                    </div>
                                </el-col>
                            </el-row>-->
                        </el-form>
                    </div>
                </el-col>
            </el-row>
        </el-dialog>
    </div>
</div>
<script>
    var vm = new Vue({
        el: '#companycredit',
        created(){
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            this.orgName = userInfo.orgName;
            if(this.orgName.includes("安评单位")){
                this.hasApprovalBtn = false;
            }

        },
        data() {
            //验证营业执照或三证合一
            let checkICard= (rule, value, callback)=>{
                if(!this.checkCard(value)){
                    callback(new Error('请输入非负数数值'));
                }else {
                    callback();
                }
            };
            return {
                value1:'',
                uuid:'',
                link:'', // 附件iframe
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                tableTotal:'',
                currentPage1: 1,
                pagesize1: 5,
                tableTotal1:'',
                hasApprovalBtn:true,
                // 用户登录信息
                userName: '', // 用户登录名称
                orgName: '', // 组织名称对应项目地址
                orgLevel: '', // 组织等级对应 地市级、省级、中国级地震局用户
                isProvinceRole: false, // 是否为普通用户角色
                companycredit: {
                    enterpriseCreditId: '',// 表单id
                    enterpriseCredittype: '1', // 0为建设单位，1为建设单位
                    enterpriseScoreNumber: '',
                    enterpriseName: '',
                    enterpriseIdNumber: '',
                    enterpriseScore: '',
                    enterpriseClassification: '',
                    assessmentDate: '',
                    assessmentAuthority: '',
                    creditRes:'',
                    scoreCause:'',
                    abnormalPutdate: '',
                    specause:'',
                    decorg:'',
                    remexcpres:'',
                    remdate: '',
                    redecorg: '',
                    enterpriseNotice: 0 // 拟办公告状态；0为未发布，1为已发布。
                },
                formDisabled: false,
                moveInDisabled: false,
                moveOutDisabled: false,
                rules: {
                    enterpriseScoreNumber: [{
                        required: true,
                        message: '请输入建设单位评分编号',
                        trigger: 'blur'
                    }],
                    enterpriseName: [{
                        required: true,
                        message: '请输入建设单位名称',
                        trigger: 'blur'
                    }],
                    enterpriseIdNumber: [{
                        required: true,
                        message: '请输入建设单位证件号码',
                        trigger: 'blur'
                    }/*,{
                        validator: checkICard,
                        message: '请输入15位或18位的营业执照号码或三证合一证照号码',
                        trigger: 'blur'
                    }*/],
                   /* enterpriseIdType: [{
                        required: true,
                        message: '请输入建设单位证件类型',
                        trigger: 'blur'
                    }],*/
                    enterpriseScore: [{
                        required: true,
                        message: '请选择建设单位分数',
                        trigger: 'blur'
                    }],
                    enterpriseClassification: [{
                        required: true,
                        message: '请选择企业类型',
                        trigger: 'blur'
                    }],
                    assessmentDate: [{
                        required: true,
                        message: '请输入评估日期',
                        trigger: 'blur'
                    }],
                    assessmentAuthority: [{
                        required: true,
                        message: '请输入作出评估决定机关',
                        trigger: 'blur'
                    }],
                    creditRes: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    scoreCause: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    abnormalPutdate: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    specause: [{
                        required: true,
                        message: '请输入列入黑名单原因',
                        trigger: 'blur'
                    }],
                    decorg: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    remexcpres: [{
                        required: true,
                        message: '请输入移出黑名单原因',
                        trigger: 'blur'
                    }],
                    remdate: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    redecorg: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    // 拟制公告公开状态
                    publicState: [{
                        required: true,
                        message: '请选择公开状态',
                        trigger: 'blur'
                    }],
                    // 拟制公告公开地址类型
                    publicState: [{
                        required: true,
                        message: '请选择公开地址类型',
                        trigger: 'blur'
                    }],
                    // 拟制公告标题
                    title: [{
                        required: true,
                        message: '请输入拟制公告标题',
                        trigger: 'blur'
                    }]
                },
                dialogFormVisible: false,
                dialogForm: false,
                dialogGongGaoForm: false,
                dialogGongGaoViewForm: false,
                formInline: {
                    enterpriseName: '',
                    enterpriseIdNumber:''
                },
                gonggao: {
                    publicId:'',
                    relationId: '',
                    content: '',
                    publicState: 0,
                    publicType: '',
                    title: '', // 拟制公告标题
                    attachContent: '', // 附加内容
                    createUser: '',
                    inputenTime: '',
                    isPublic: '0'
                },
                selectForm: {
                    enterpriseScoreNumber: '',
                    enterpriseName: '',
                    enterpriseIdNumber: '',
                    enterpriseScore: '',
                    enterpriseClassification: ''
                },
                companyInformation: [],
                currentRow: null,
                tableData: [],
                showMoveInList: true,
                showMoveOutList: false,
                showOnSubmit: true,
                showOnRemoveList: false
            }
        },
        mounted(){
            this.getData();
            this.getdatatime()
        },
        methods: {
            getdatatime(){
                this.value1 = new Date();
            },
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                var credittype = this.companycredit.enterpriseCredittype;
                axios({
                    method: 'get',
                    url: '/dzjap/enterJsPrise/getAllReEnterPrise',
                    params: {
                        enterpriseCredittype: credittype,
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let dataInformation = data.data.results;
                        this.tableTotal = data.data.total;// 数据长度s
                        this.tableData = dataInformation;

                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            //获取UUID的方法
            getUuid() {
                axios({
                    method: 'get',
                    url: '/dzjap/uuid/getUuid',
                })
                    .then(response => {
                    console.log(response);
                if (response.data.code == 200) {
                    this.uuid = response.data.data;
                    this.link="../upload/annex.html?uuid="+this.uuid+"&flag=1";
                    console.log(this.uuid);
                } else {
                    this.$message.error(response.data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            // 检查移入和移出黑名单原因是否有值
            checkReason(movein,moveout){
                // 移入黑名单
                if(movein == '' || movein == null || movein == undefined){
                    this.showMoveInList = false;
                    this.moveInDisabled = true;
                }else{
                    this.showMoveInList = true;
                    this.moveInDisabled = false;
                }

                // 移出黑名单
                if(moveout == '' || moveout == null || moveout == undefined){
                    this.showMoveOutList = false;
                    this.moveOutDisabled = true;
                }else{
                    this.showMoveOutList = true;
                    this.moveOutDisabled = false;
                }
            },
            // 判断查询分数
            checkPriseScore(){
                var val = this.selectForm.enterpriseScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.selectForm.enterpriseScore = val;
            },
            // 判断添加分数
            checkPriseScore1(){
                var val = this.companycredit.enterpriseScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.companycredit.enterpriseScore = val;
            },
            //公用方法，不能输入e和点
            channelInput(e){
                var key = e.key;
                if(key === 'e' || key === '.'){
                    e.returnValue = false;
                    return false;
                }
                return true;
            },
            clearForm(){
                this.showMoveOutList = false;
                this.moveInDisabled = false;
                this.moveOutDisabled = false;
                // this.$refs[name].clearValidate();
                this.clearFromInformation();
            },
            // 清空表单
            clearFromInformation(){
                this.companycredit.enterpriseCreditId = '';// 表单id
                this.companycredit.enterpriseCredittype = '1'; // 0为建设单位，1为建设单位
                this.companycredit.enterpriseScoreNumber = '';
                this.companycredit.enterpriseName = '';
                this.companycredit.enterpriseIdNumber = '';
                this.companycredit.enterpriseScore = '';
                this.companycredit.enterpriseClassification = '';
                this.companycredit.assessmentDate = '';
                this.companycredit.assessmentAuthority = '';
                this.companycredit.creditRes ='';
                this.companycredit.scoreCause ='';
                this.companycredit.abnormalPutdate = '';
                this.companycredit.specause ='';
                this.companycredit.decorg ='';
                this.companycredit.remexcpres ='';
                this.companycredit.remdate = '';
                this.companycredit.redecorg = '';

                this.gonggao.title = ''; // 拟制公告标题
                this.gonggao.relationId = '';
                this.gonggao.content = '';
                this.gonggao.publicState = 0;
                this.gonggao.publicType = '';
                this.gonggao.attachContent = '';
                this.gonggao.isPublic = '0';
            },
            // 设置允许填写和不允许填写
            checkDisabled(n){
                if(n){
                    this.formDisabled = true;
                }else{
                    this.formDisabled = false;
                }
            },
            // 表单提交
            onSubmit(formName) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        this.companycredit.enterpriseCreditId = this.uuid;
                        this.companycredit.scoreCause = this.companycredit.scoreCause.replace(/[\n\r]/g,'<br/>');
                        this.companycredit.creditRes = this.companycredit.creditRes.replace(/[\n\r]/g,'<br/>');
                        axios({
                            method: 'post',
                            url: '/dzjap/enterJsPrise/addReConEnterPrise',
                            data: this.companycredit
                        })
                        .then((response) => {
                            let data = response.data;
                            if (data.code == 200) {
                                this.dialogForm = false;
                                this.$message({
                                    type: 'success',
                                    message: '添加成功!'
                                });
                                this.getData();
                            } else {
                                this.$message.error(data.msg);
                            }
                        });
                    }else{
                        this.$message.error('输入有误！');
                        return false;
                    }
                })
            },
            // 表单修改
            onReplace(){
                this.companycredit.scoreCause = this.companycredit.scoreCause.replace(/[\n\r]/g,'<br/>');
                this.companycredit.creditRes = this.companycredit.creditRes.replace(/[\n\r]/g,'<br/>');
                axios({
                    method: 'post',
                    url: '/dzjap/enterJsPrise/updateEnterPrise',
                    data: this.companycredit
                })
                .then((response) => {
                    let data = response.data;
                    if (data.code == 200) {
                        this.dialogForm = false;
                        this.$message({
                            type: 'success',
                            message: '修改成功!'
                        });
                        this.getData();
                    } else {
                        this.$message.error(data.msg);
                    }
                });
            },
            handleChange(value) {
                console.log(value);
            },
            // 企业信息搜索
            onSearch(){
                axios({
                    method: 'get',
                    url: '/dzjap/constr/listcontr',
                    params: {
                        pageSize:this.pagesize1,
                        pageNo:this.currentPage1,
                        enterpriseName:this.formInline.enterpriseName,
                        enterpriseIdNumber:this.formInline.enterpriseIdNumber
                    }
                })
                    .then(response => {
                        let data=response.data.data.results;
                this.tableTotal1 = response.data.data.total;
                        this.companyInformation=data;
                    });
            },
            // 移出黑名单
            onRemoveBlackList(){
                axios({
                    method: 'post',
                    url: '/dzjap/enterJsPrise/moveoutEnterPrise',
                    data: this.companycredit
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        this.dialogForm = false;
                        // 移出黑名单成功
                        this.$message({
                            type: 'success',
                            message: '移出黑名单成功!'
                        });
                        this.getData();
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            apply(){
                this.dialogForm = true;
                this.showOnSubmit = true;
                this.showOnRemoveList = false;

                this.checkDisabled(false);

                this.clearForm();
                this.getUuid();
                this.moveOutDisabled = false;
                this.moveInDisabled = false;
                this.formDisabled = false;

                let date = new Date();
                let y = date.getFullYear();
                let MM = date.getMonth() + 1;
                MM = MM < 10 ? ('0' + MM) : MM;
                let d = date.getDate();
                d = d < 10 ? ('0' + d) : d;
                let h = date.getHours();
                h = h < 10 ? ('0' + h) : h;
                let m = date.getMinutes();
                m = m < 10 ? ('0' + m) : m;
                let s = date.getSeconds();
                s = s < 10 ? ('0' + s) : s;
                let sss = date.getMilliseconds();
                sss = sss < 10 ? ('0' + sss) : sss;
                console.log(y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s +'.'+sss);

                this.companycredit.enterpriseScoreNumber = y+''+MM+''+d+''+h+''+m+''+s+''+sss;
            },
            /* 单选搜索表单 */
            selectCurrentChange(val){
                this.currentRow = val;
            },
            /* 搜索结束，回显数据 */
            onAddInformation(){
                this.dialogFormVisible = false; // 关dialog

                this.formInline.enterpriseName='';
                this.formInline.enterpriseIdNumber='';
                // 回显数据
                const comInformation = this.currentRow;
                //this.companycredit.enterpriseScoreNumber = comInformation.enterpriseScoreNumber;
                this.companycredit.enterpriseName = comInformation.enterpriseName;
                this.companycredit.enterpriseIdNumber = comInformation.enterpriseIdNumber;

               /* this.companycredit.enterpriseScore = comInformation.enterpriseScore;
                this.companycredit.enterpriseClassification = comInformation.enterpriseClassification;*/
            },
            /* 列表页搜索 */
            searchForm(selectForm) {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                var credittype = this.companycredit.enterpriseCredittype;

                axios({
                    method: 'get',
                    url: '/dzjap/enterJsPrise/getAllReConEnterPrise',
                    params: {
                        enterpriseCredittype: credittype,
                        pageSize: pagesize,
                        pageNo: pageno,
                        enterpriseScoreNumber: this.selectForm.enterpriseScoreNumber,
                        enterpriseName: this.selectForm.enterpriseName,
                        enterpriseIdNumber: this.selectForm.enterpriseIdNumber,
                        enterpriseScore: this.selectForm.enterpriseScore,
                        enterpriseClassification: this.selectForm.enterpriseClassification
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let dataInformation = response.data.data.results;
                        this.tableTotal = response.data.data.total;// 数据长度

                        this.tableData = dataInformation;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            /* 列表页重置 */
            resetForm(formName) {
                this.selectForm.enterpriseScoreNumber = '';
                this.selectForm.enterpriseName = '';
                this.selectForm.enterpriseIdNumber = '';
                this.selectForm.enterpriseScore = '';
                this.selectForm.enterpriseClassification = '';

                this.getData();
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            handleSizeChange1(size) {
                this.pagesize1 = size;
                this.onSearch();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange1(currentPage) {
                this.currentPage1 = currentPage;
                this.onSearch();
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 关闭方法
            handleDialogClose(){
                this.dialogFormVisible = false;
                this.formInline.enterpriseName='';
                this.formInline.enterpriseIdNumber='';

            },
            // 移出黑名单
            removeBlacklist(index,row){
                this.dialogForm = true;
                this.showOnSubmit = false;
                this.showOnRemoveList = true;
                this.clearFromInformation(); // 重置

                axios({
                    method: 'get',
                    url: '/dzjap/enterJsPrise/getReEnterPrise',
                    params: {
                        enterpriseCreditId: row.enterpriseCreditId,
                        enterpriseCredittype: row.enterpriseCredittype
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let rowdata = response.data.data;
                        this.clearForm(); // 重置

                        this.companycredit = rowdata;

                        this.moveOutDisabled = false;
                        this.moveInDisabled = true;
                        this.checkDisabled(true);
                        this.showMoveInList = true;
                        this.showMoveOutList = true;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            // 查看
            view(index,row){
                this.dialogForm = true;
                this.showOnSubmit = false;
                this.showOnRemoveList = false;
                this.showInformation(index,row);
                this.checkDisabled(true);
            },
            // 公共方法--查看
            showInformation(index,row){
                this.clearFromInformation(); // 重置

                axios({
                    method: 'get',
                    url: '/dzjap/enterJsPrise/getReEnterPrise',
                    params: {
                        enterpriseCreditId: row.enterpriseCreditId,
                        enterpriseCredittype: row.enterpriseCredittype
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let rowdata = response.data.data;
                        this.clearForm(); //重置

                        rowdata.scoreCause = rowdata.scoreCause.replace(/<br\/>/g, '\n');
                        rowdata.creditRes = rowdata.creditRes.replace(/<br\/>/g, '\n');
                        this.companycredit = rowdata;
                        // 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
                        this.checkReason(rowdata.specause,rowdata.remexcpres);

                        this.moveOutDisabled = true;
                        this.moveInDisabled = true;
                        this.showMoveInList = true;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },

            // 拟制公告
            gongGao(index,row){
                this.dialogGongGaoForm = true;
                this.getUuid();

                axios({
                    method: 'get',
                    url: '/dzjap/enterJsPrise/getReEnterPrise',
                    params: {
                        enterpriseCreditId: row.enterpriseCreditId,
                        enterpriseCredittype: row.enterpriseCredittype
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        let rowdata = response.data.data;
                        this.clearForm(); // 重置

                        this.companycredit = rowdata;
                        // 检查移入和移出黑名单原因是否有数据，从而判断是否显示列表
                        this.checkReason(rowdata.specause,rowdata.remexcpres);

                        this.moveOutDisabled = true;
                        this.moveInDisabled = true;

                        this.gonggao.relationId = this.companycredit.enterpriseCreditId;
                        this.gonggao.content =
                            this.companycredit.enterpriseScoreNumber + '\r\n' +
                            this.companycredit.enterpriseName + '\r\n' +
                            this.companycredit.enterpriseIdNumber + '\r\n' +
                            this.companycredit.enterpriseScore + '\r\n' +
                            this.companycredit.enterpriseClassification + '\r\n' +
                            this.companycredit.assessmentDate + '\r\n' +
                            this.companycredit.assessmentAuthority + '\r\n' +
                            this.companycredit.creditRes + '\r\n' +
                            this.companycredit.scoreCause + '\r\n' +
                            this.companycredit.abnormalPutdate + '\r\n' +
                            this.companycredit.specause + '\r\n' +
                            this.companycredit.decorg + '\r\n' +
                            this.companycredit.remexcpres + '\r\n' +
                            this.companycredit.remdate + '\r\n' +
                            this.companycredit.redecorg;
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            // 拟制公告--发布
            release(){
                this.gonggao.relationId = this.companycredit.enterpriseCreditId;
                this.gonggao.publicId = this.uuid;
                this.gonggao.attachContent = this.gonggao.attachContent.replace(/[\n\r]/g,'<br/>');
                axios({
                    method: 'post',
                    url: '/dzjap/publick/addGlJsRePublick/'+this.companycredit.enterpriseCredittype,
                    data: this.gonggao
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        this.dialogGongGaoForm = false;
                        this.clearForm(); // 重置

                        // 拟制公告--发布成功
                        this.$message({
                            type: 'success',
                            message: '拟制公告发布成功!'
                        });
                        this.getData();
                    } else {
                        this.$message.error(data.msg);
                        this.gonggao.attachContent = this.gonggao.attachContent.replace(/<br\/>/g, '\n');
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            // 查看公告
            gongGaoView(index,row){
                this.dialogGongGaoViewForm = true;
                axios({
                    method: 'get',
                    url:'/dzjap/publick/getGlPublick',
                    params: {
                        relationId: row.enterpriseCreditId
                    }
                })
                    .then(response => {
                    let data = response.data;
                if (data.code == 200) {
                    let rowdata = response.data.data;
                    this.clearForm();
                    this.uuid = response.data.data.publicId;
                    this.link="../upload/annex.html?uuid="+this.uuid+"&flag=0";
                    this.gonggao = rowdata;
                } else {
                    this.$message.error(data.msg);
                }
            })
            .catch(function (error) {
                    console.log(error);
                });
            },
            //建设单位黑名单导出
            appovalEx(){
                window.location.href="/dzjap/export/enterReExport?enterpriseScoreNumber="+this.companycredit.enterpriseScoreNumber+"&enterpriseName="
                    +this.companycredit.enterpriseName+"&enterpriseIdNumber="
                    +this.companycredit.enterpriseIdNumber+"&enterpriseScore="
                    +this.companycredit.enterpriseScore+"&enterpriseClassification="
                    +this.companycredit.enterpriseClassification+"&enterpriseCredittype="
                    +this.companycredit.enterpriseCredittype+"&pageNo=1";
            },
            //验证营业执照或证件三合一
            checkCard(str){
                let re=/(^(?:(?![IOZSV])[\dA-Z]){2}\d{6}(?:(?![IOZSV])[\dA-Z]){10}$)|(^\d{15}$)/;
                if (re.test(str)) {
                    return true;
                } else {
                    return false;
                }
            }
        }
    })
</script>
</body>
</html>